﻿@model Lokad.Cloud.Console.WebRole.Models.Scheduler.SchedulerModel
@{ ViewBag.Title = "Lokad.Cloud Administration Console - Scheduler"; }

<h1>Scheduler</h1>
<p>Manage scheduled execution of your services.</p>

<table class="table">
	<tr>
		<th>Name</th>
		<th>Last Run</th>
		<th>Period</th>
		<th>Scope</th>
		<th>Lease</th>
	</tr>

	@foreach (var item in Model.Schedules) {
		<tr>
			<td>@item.ServiceName</td>
			<td>@(item.WorkerScoped ? "untracked" : FormatUtil.TimeOffsetUtc(item.LastExecuted.UtcDateTime))</td>
			<td>@item.TriggerInterval</td>
			<td>@(item.WorkerScoped ? "Worker" : "Cloud")</td>
			<td>@PresentationHelpers.PrettyFormatLease(item)</td>
		</tr>
	}

</table>

